home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / DebugGraphicsInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  1.3 KB  |  49 lines

  1. package javax.swing;
  2.  
  3. import java.awt.Color;
  4. import java.io.PrintStream;
  5. import java.util.Hashtable;
  6.  
  7. class DebugGraphicsInfo {
  8.    Color flashColor;
  9.    int flashTime;
  10.    int flashCount;
  11.    Hashtable componentToDebug;
  12.    JFrame debugFrame;
  13.    PrintStream stream;
  14.  
  15.    DebugGraphicsInfo() {
  16.       this.flashColor = Color.red;
  17.       this.flashTime = 100;
  18.       this.flashCount = 2;
  19.       this.debugFrame = null;
  20.       this.stream = System.out;
  21.    }
  22.  
  23.    int getDebugOptions(JComponent var1) {
  24.       if (this.componentToDebug == null) {
  25.          return 0;
  26.       } else {
  27.          Integer var2 = (Integer)this.componentToDebug.get(var1);
  28.          return var2 == null ? 0 : var2;
  29.       }
  30.    }
  31.  
  32.    void log(String var1) {
  33.       this.stream.println(var1);
  34.    }
  35.  
  36.    void setDebugOptions(JComponent var1, int var2) {
  37.       if (this.componentToDebug == null) {
  38.          this.componentToDebug = new Hashtable();
  39.       }
  40.  
  41.       if (var2 > 0) {
  42.          this.componentToDebug.put(var1, new Integer(var2));
  43.       } else {
  44.          this.componentToDebug.remove(var1);
  45.       }
  46.  
  47.    }
  48. }
  49.